<?php

namespace app\app\controller\order;

use app\app\controller\AppBase;
use app\app\validate\order\BillValidate;

class Bill extends AppBase
{
    protected $noNeedLogin = [];

    /**
     * Notes: 添加财务流水
     * User: chenLei
     * Date: 8/15/25
     */
    public function add()
    {
        $validate = new BillValidate();
        if (!$validate->scene('add')->check($this->params)) {
            $this->error($validate->getError());
        }

        $billModel = new \app\common\model\Bill();
        $res = $billModel->add($this->params);
        if ($res === false) {
            $this->error($billModel->getError());
        }

        $this->success('success');
    }
}